
// 常量路由
export const constantRoute = [
  {
    path: '/',
    name: 'Layout',
    component: () => import('@/layout/index.vue'),
    meta: {
      // title: 'layout',
      hidden: false,
      icon: 'TurnOff'
    },
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false,
          icon: 'HomeFilled'
        }
      }
    ]
  },
  {
    path: '/screen',
    name: 'Screen',
    component: () => import('@/views/screen/index.vue'),
    meta: {
      title: '数据大屏',
      hidden: false,
      icon: 'DataLine'
    }
  },
  {
    path: '/study',
    name: 'Study',
    component: () => import('@/views/study/index.vue'),
    meta: {
      title: '学习中心',
      hidden: false,
      icon: 'Notebook'
    }
  },
  {
    path: '/acl',
    name: 'Acl',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '权限管理',
      hidden: false,
      icon: 'View'
    },
    redirect: '/acl/user',
    children: [
      {
        path: '/acl/user',
        name: 'User',
        component: () => import('@/views/acl/user/index.vue'),
        meta: {
          title: '用户管理',
          hidden: false,
          icon: 'User'
        }
      },
      {
        path: '/acl/role',
        name: 'Role',
        component: () => import('@/views/acl/role/index.vue'),
        meta: {
          title: '角色管理',
          hidden: false,
          icon: 'Avatar'
        }
      },
      {
        path: '/acl/permission',
        name: 'Permission',
        component: () => import('@/views/acl/permission/index.vue'),
        meta: {
          title: '菜单管理',
          hidden: false,
          icon: 'Grid'
        }
      }
    ]
  },
  {
    path: '/tools',
    name: 'Tools',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '工具箱',
      hidden: false,
      icon: 'Tools'
    },
    redirect: '/tools/encryption',
    children: [
      {
        path: '/tools/encryption',
        name: 'Encryption',
        component: () => import('@/views/tools/encryption/index.vue'),
        meta: {
          title: '实用工具',
          hidden: false,
          icon: 'Lock'
        }
      },
      {
        path: '/tools/md5',
        name: 'Md5',
        component: () => import('@/views/tools/encryption/child/md5.vue'),
        meta: {
          title: 'MD5加密',
          hidden: true,
          icon: 'Lock'
        }
      },
      {
        path: '/tools/base64',
        name: 'Base64',
        component: () => import('@/views/tools/encryption/child/base64.vue'),
        meta: {
          title: 'BASE64加密',
          hidden: true,
          icon: 'Lock'
        }
      },
      {
        path: '/tools/translate',
        name: 'Translate',
        component: () => import('@/views/tools/encryption/child/translate.vue'),
        meta: {
          title: '英汉互译',
          hidden: true,
          icon: 'Switch'
        }
      },
      {
        path: '/tools/qrcode',
        name: 'Qrcode',
        component: () => import('@/views/tools/encryption/child/qrcode.vue'),
        meta: {
          title: '二维码生成',
          hidden: true,
          icon: 'PictureFilled'
        }
      },
      {
        path: '/tools/calculator',
        name: 'Calculator',
        component: () => import('@/views/tools/encryption/child/calculator.vue'),
        meta: {
          title: '计算器',
          hidden: true,
          icon: 'Cpu'
        }
      },
      {
        path: '/tools/calendar',
        name: 'Calendar',
        component: () => import('@/views/tools/encryption/child/calendar.vue'),
        meta: {
          title: '万年历',
          hidden: true,
          icon: 'Calendar'
        }
      },
      {
        path: '/tools/clock',
        name: 'Clock',
        component: () => import('@/views/tools/encryption/child/clock.vue'),
        meta: {
          title: '时钟工具',
          hidden: true,
          icon: 'AlarmClock'
        }
      },
      {
        path: '/tools/weather',
        name: 'Weather',
        component: () => import('@/views/tools/encryption/child/weather.vue'),
        meta: {
          title: '天气状况',
          hidden: true,
          icon: 'Drizzling'
        }
      },
      {
        path: '/tools/map',
        name: 'Map',
        component: () => import('@/views/tools/encryption/child/map.vue'),
        meta: {
          title: '地图功能',
          hidden: true,
          icon: 'MapLocation'
        }
      },
      {
        path: '/tools/bdmap',
        name: 'bdMap',
        component: () => import('@/views/tools/encryption/child/bdmap.vue'),
        meta: {
          title: '百度地图',
          hidden: true,
          icon: 'MapLocation'
        }
      },
      {
        path: '/tools/gdmap',
        name: 'gdMap',
        component: () => import('@/views/tools/encryption/child/gdmap.vue'),
        meta: {
          title: '高德地图',
          hidden: true,
          icon: 'MapLocation'
        }
      },
      {
        path: '/tools/exchange',
        name: 'Exchange',
        component: () => import('@/views/tools/encryption/child/exchange.vue'),
        meta: {
          title: '汇率换算',
          hidden: true,
          icon: 'Sort'
        }
      },
      {
        path: '/tools/color',
        name: 'Color',
        component: () => import('@/views/tools/encryption/child/color.vue'),
        meta: {
          title: '色值转化器',
          hidden: true,
          icon: 'HelpFilled'
        }
      },
      {
        path: '/tools/kline',
        name: 'Kline',
        component: () => import('@/views/tools/encryption/child/kline.vue'),
        meta: {
          title: '股票走势',
          hidden: true,
          icon: 'TrendCharts'
        }
      },
      {
        path: '/tools/games',
        name: 'Games',
        component: () => import('@/views/tools/encryption/child/games.vue'),
        meta: {
          title: '复古游戏',
          hidden: true,
          icon: 'SwitchFilled'
        }
      },
      {
        path: '/tools/block',
        name: 'Block',
        component: () => import('@/views/tools/encryption/child/block.vue'),
        meta: {
          title: '俄罗斯方块',
          hidden: true,
          icon: 'SwitchFilled'
        }
      },
      {
        path: '/tools/jsbeautify',
        name: 'Jsbeautify',
        component: () => import('@/views/tools/encryption/child/jsbeautify.vue'),
        meta: {
          title: '代码格式化',
          hidden: true,
          icon: 'EditPen'
        }
      },
      {
        path: '/tools/testDiscrepancy',
        name: 'testDiscrepancy',
        component: () => import('@/views/tools/encryption/child/testDiscrepancy.vue'),
        meta: {
          title: '文本差异化',
          hidden: true,
          icon: 'EditPen'
        }
      },
      {
        path: '/tools/reduce',
        name: 'Reduce',
        component: () => import('@/views/tools/encryption/child/reduce.vue'),
        meta: {
          title: '压缩代码',
          hidden: true,
          icon: 'EditPen'
        }
      },
      {
        path: '/tools/piano',
        name: 'Piano',
        component: () => import('@/views/tools/encryption/child/piano.vue'),
        meta: {
          title: '演奏钢琴',
          hidden: true,
          icon: 'Headset'
        }
      },
      {
        path: '/tools/write',
        name: 'Write',
        component: () => import('@/views/tools/encryption/child/write.vue'),
        meta: {
          title: '手写板',
          hidden: true,
          icon: 'Tickets'
        }
      },
      {
        path: '/tools/wheel',
        name: 'Wheel',
        component: () => import('@/views/tools/encryption/child/wheel.vue'),
        meta: {
          title: '幸运大转盘',
          hidden: true,
          icon: 'Orange'
        }
      },
      {
        path: '/tools/constellation',
        name: 'Constellation',
        component: () => import('@/views/tools/encryption/child/constellation.vue'),
        meta: {
          title: '星座运势',
          hidden: true,
          icon: 'Star'
        }
      },
      {
        path: '/tools/poetry',
        name: 'Poetry',
        component: () => import('@/views/tools/encryption/child/poetry.vue'),
        meta: {
          title: '藏头诗生成',
          hidden: true,
          icon: 'ScaleToOriginal'
        }
      },
      {
        path: '/tools/gasoline',
        name: 'Gasoline',
        component: () => import('@/views/tools/encryption/child/gasoline.vue'),
        meta: {
          title: '今日油价',
          hidden: true,
          icon: 'NoSmoking'
        }
      },
      {
        path: '/tools/ocr',
        name: 'Ocr',
        component: () => import('@/views/tools/encryption/child/ocr.vue'),
        meta: {
          title: 'OCR识别',
          hidden: true,
          icon: 'CameraFilled'
        }
      },
      {
        path: '/tools/compressor',
        name: 'Compressor',
        component: () => import('@/views/tools/encryption/child/compressor.vue'),
        meta: {
          title: '图片压缩',
          hidden: true,
          icon: 'PictureFilled'
        }
      },
      {
        path: '/tools/relative',
        name: 'Relative',
        component: () => import('@/views/tools/encryption/child/relative.vue'),
        meta: {
          title: '亲属计算器',
          hidden: true,
          icon: 'Avatar'
        }
      },
      {
        path: '/tools/healthy',
        name: 'Healthy',
        component: () => import('@/views/tools/encryption/child/healthy.vue'),
        meta: {
          title: '健康助手',
          hidden: true,
          icon: 'Medal'
        }
      },
      {
        path: '/tools/bmi',
        name: 'Bmi',
        component: () => import('@/views/tools/encryption/child/bmi.vue'),
        meta: {
          title: 'BMI计算器',
          hidden: true,
          icon: 'Pear'
        }
      },
      {
        path: '/tools/calorie',
        name: 'Calorie',
        component: () => import('@/views/tools/encryption/child/calorie.vue'),
        meta: {
          title: '热量计算器',
          hidden: true,
          icon: 'Food'
        }
      },
      {
        path: '/tools/metabolism',
        name: 'Metabolism',
        component: () => import('@/views/tools/encryption/child/metabolism.vue'),
        meta: {
          title: '代谢计算器',
          hidden: true,
          icon: 'Football'
        }
      },
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
      hidden: true,
      icon: 'UserFilled'
    }
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@/views/404/index.vue'),
    meta: {
      title: '页面走丢了',
      hidden: true,
      icon: 'QuestionFilled'
    }
  },
  {
    path: '/:pathMatch(.*)* ',
    redirect: '/404',
    name: 'Any',
    meta: {
      title: '任意路由',
      hidden: true,
      icon: 'Switch'
    }
  }
]

// 异步路由
export const asyncRoute = [
  {
    path: '/acl',
    name: 'Acl',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '权限管理',
      hidden: false,
      icon: 'View'
    },
    redirect: '/acl/user',
    children: [
      {
        path: '/acl/user',
        name: 'User',
        component: () => import('@/views/acl/user/index.vue'),
        meta: {
          title: '用户管理',
          hidden: false,
          icon: 'User'
        }
      },
      {
        path: '/acl/role',
        name: 'Role',
        component: () => import('@/views/acl/role/index.vue'),
        meta: {
          title: '角色管理',
          hidden: false,
          icon: 'Avatar'
        }
      },
      {
        path: '/acl/permission',
        name: 'Permission',
        component: () => import('@/views/acl/permission/index.vue'),
        meta: {
          title: '菜单管理',
          hidden: false,
          icon: 'Grid'
        }
      }
    ]
  }
]

// 任意路由
export const anyRoute = {
  path: '/:pathMatch(.*)* ',
  redirect: '/404',
  name: 'Any',
  meta: {
    title: '任意路由',
    hidden: true,
    icon: 'Switch'
  }
}